package sh.wn36.vehiclemanage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import sh.wn36.vehiclemanage.entity.CurrentUnit;
import sh.wn36.vehiclemanage.mapper.CurrentUnitMapper;
import sh.wn36.vehiclemanage.service.CurrentUnitService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import sh.wn36.vehiclemanage.xzy.UnitQuery;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xk
 * @since 2021-04-26
 */
@Service
public class CurrentUnitServiceImpl extends ServiceImpl<CurrentUnitMapper, CurrentUnit> implements CurrentUnitService {
    @Autowired
    private CurrentUnitMapper currentUnitMapper;

    @Override
    public IPage<UnitQuery> getAll(Page<UnitQuery> page, QueryWrapper<UnitQuery> queryWrapper) {
        return currentUnitMapper.selectPage(page,queryWrapper);
    }

    @Override
    public List<UnitQuery> selOne() {
        return currentUnitMapper.selOne();
    }

    @Override
    public List<CurrentUnit> listByIdInsu() {
        return currentUnitMapper.selectInsu();
    }

    @Override
    public List<CurrentUnit> listByRefule() {
        return currentUnitMapper.selectRefuel();
    }

    @Override
    public List<CurrentUnit> findType(Integer type) {
        List<CurrentUnit> tYype = currentUnitMapper.findTYype(type);
        return tYype;
    }

}
